﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace EFCore.Migrations
{
    /// <inheritdoc />
    public partial class init : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "Bonus",
                columns: table => new
                {
                    BonId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    MajorKindId = table.Column<int>(type: "int", nullable: false),
                    MajorKindName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    MajorId = table.Column<int>(type: "int", nullable: false),
                    MajorName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    HumanId = table.Column<int>(type: "int", nullable: false),
                    HumanName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    BonusItem = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
                    BonusWorth = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    BonusDegree = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: false),
                    Register = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    Checker = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    RegistTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    CheckTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    CheckStatus = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Bonus", x => x.BonId);
                });

            migrationBuilder.CreateTable(
                name: "CFFK",
                columns: table => new
                {
                    FfkId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    FirstKindId = table.Column<int>(type: "int", nullable: false),
                    FirstKindName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    FirstKindSalaryId = table.Column<int>(type: "int", nullable: true),
                    FirstKindSaleId = table.Column<int>(type: "int", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_CFFK", x => x.FfkId);
                });

            migrationBuilder.CreateTable(
                name: "CFSK",
                columns: table => new
                {
                    FskId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    FirstKindId = table.Column<int>(type: "int", nullable: false),
                    FirstKindName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    SecondKindId = table.Column<int>(type: "int", nullable: false),
                    SecondKindName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    SecondSalaryId = table.Column<int>(type: "int", nullable: true),
                    SecondSaleId = table.Column<int>(type: "int", nullable: true),
                    CFSKFskId = table.Column<int>(type: "int", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_CFSK", x => x.FskId);
                    table.ForeignKey(
                        name: "FK_CFSK_CFSK_CFSKFskId",
                        column: x => x.CFSKFskId,
                        principalTable: "CFSK",
                        principalColumn: "FskId");
                });

            migrationBuilder.CreateTable(
                name: "CFTK",
                columns: table => new
                {
                    FtkId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    FirstKindId = table.Column<int>(type: "int", nullable: false),
                    FirstKindName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SecondKindId = table.Column<int>(type: "int", nullable: false),
                    SecondKindName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ThirdKindId = table.Column<int>(type: "int", nullable: false),
                    ThirdKindIsRetail = table.Column<int>(type: "int", nullable: false),
                    SecondSaleId = table.Column<int>(type: "int", nullable: false),
                    ThirdKindName = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_CFTK", x => x.FtkId);
                });

            migrationBuilder.CreateTable(
                name: "CMK",
                columns: table => new
                {
                    MfkId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    MajorKindId = table.Column<int>(type: "int", nullable: false),
                    MajorKindName = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_CMK", x => x.MfkId);
                });

            migrationBuilder.CreateTable(
                name: "CPC",
                columns: table => new
                {
                    PbcId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    AttributeKind = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    AttributeName = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_CPC", x => x.PbcId);
                });

            migrationBuilder.CreateTable(
                name: "CQFK",
                columns: table => new
                {
                    QfkId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    FirstKindId = table.Column<int>(type: "int", nullable: false),
                    FirstKindName = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_CQFK", x => x.QfkId);
                });

            migrationBuilder.CreateTable(
                name: "CQSK",
                columns: table => new
                {
                    QskId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    FirstKindId = table.Column<int>(type: "int", nullable: false),
                    FirstKindName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    SecondKindId = table.Column<int>(type: "int", nullable: false),
                    SecondKindName = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_CQSK", x => x.QskId);
                });

            migrationBuilder.CreateTable(
                name: "EA",
                columns: table => new
                {
                    AnsId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    AnswerNumber = table.Column<int>(type: "int", nullable: false),
                    ExamNumber = table.Column<int>(type: "int", nullable: false),
                    ResumeId = table.Column<int>(type: "int", nullable: false),
                    HumanIdcard = table.Column<int>(type: "int", nullable: false),
                    InterviewIid = table.Column<int>(type: "int", nullable: false),
                    HumanName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    MajorKindId = table.Column<int>(type: "int", nullable: false),
                    MajorKindName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    MajorId = table.Column<int>(type: "int", nullable: false),
                    MajorName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    TestTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UseTime = table.Column<int>(type: "int", nullable: false),
                    TotalPoint = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_EA", x => x.AnsId);
                });

            migrationBuilder.CreateTable(
                name: "EAD",
                columns: table => new
                {
                    AndId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    AnswerNumber = table.Column<int>(type: "int", nullable: false),
                    SubjectId = table.Column<int>(type: "int", nullable: false),
                    Answer = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_EAD", x => x.AndId);
                });

            migrationBuilder.CreateTable(
                name: "EE",
                columns: table => new
                {
                    ExaId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ExamNumber = table.Column<int>(type: "int", nullable: false),
                    MajorKindId = table.Column<int>(type: "int", nullable: false),
                    MajorKindName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    MajorId = table.Column<int>(type: "int", nullable: false),
                    MajorName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Register = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    RegistTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    LimiteTime = table.Column<DateTime>(type: "datetime2", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_EE", x => x.ExaId);
                });

            migrationBuilder.CreateTable(
                name: "EED",
                columns: table => new
                {
                    ExdId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ExamNumber = table.Column<int>(type: "int", nullable: false),
                    FirstKindId = table.Column<int>(type: "int", nullable: false),
                    FirstKindName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    SecondKindId = table.Column<int>(type: "int", nullable: false),
                    SecondKindName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    QuestionAmount = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_EED", x => x.ExdId);
                });

            migrationBuilder.CreateTable(
                name: "EI",
                columns: table => new
                {
                    EinId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    HumanName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    InterviewAmount = table.Column<int>(type: "int", nullable: false),
                    HumanMajorKindId = table.Column<int>(type: "int", nullable: false),
                    HumanMajorKindName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    HumanMajorId = table.Column<int>(type: "int", nullable: false),
                    HunmaMajorName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ImageDegree = table.Column<int>(type: "int", nullable: false),
                    NativeLanguageDegree = table.Column<int>(type: "int", nullable: false),
                    ForeignLanguageDegree = table.Column<int>(type: "int", nullable: false),
                    ResponseSpeedDegree = table.Column<int>(type: "int", nullable: false),
                    EQDegree = table.Column<int>(type: "int", nullable: false),
                    IQDegree = table.Column<int>(type: "int", nullable: false),
                    MultiQualityDegree = table.Column<int>(type: "int", nullable: false),
                    Register = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Checker = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    RegisteTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    CheckTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    ResumeId = table.Column<int>(type: "int", nullable: false),
                    Result = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    InterviewComment = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    CheckComment = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    InterviewStatus = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    CheckStatus = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_EI", x => x.EinId);
                });

            migrationBuilder.CreateTable(
                name: "EMR",
                columns: table => new
                {
                    MreId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    FirstKindId = table.Column<int>(type: "int", nullable: true),
                    FirstKindName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    SecondKindId = table.Column<int>(type: "int", nullable: true),
                    SecondKindName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    ThirdKindId = table.Column<int>(type: "int", nullable: true),
                    ThirdKindName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    MajorId = table.Column<int>(type: "int", nullable: true),
                    MajorName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    HumanAmount = table.Column<int>(type: "int", nullable: true),
                    EngageType = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    Deadline = table.Column<DateTime>(type: "datetime2", nullable: true),
                    Register = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    Changer = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    RegistTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    ChangeTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    MajorDescribe = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
                    EngageRequired = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_EMR", x => x.MreId);
                });

            migrationBuilder.CreateTable(
                name: "ER",
                columns: table => new
                {
                    ResId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    HumanName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    EngageType = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    HumanAddress = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    HumanPostcode = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    HumanMajorKindId = table.Column<int>(type: "int", nullable: true),
                    HumanMajorKindName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    HumanMajorId = table.Column<int>(type: "int", nullable: true),
                    HunmaMajorName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    HumanTelephone = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    HumanHomephone = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    HumanMobilephone = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    HumanEmail = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    HumanHobby = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    HumanSpeciality = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    HumanSex = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Email = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    HumanReligion = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    HumanParty = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    HumanNationality = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    HumanRace = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    HumanBirthday = table.Column<DateTime>(type: "datetime2", nullable: false),
                    HumanAge = table.Column<int>(type: "int", nullable: true),
                    HumanEducatedDegree = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    HumanEducatedYears = table.Column<int>(type: "int", nullable: true),
                    HumanEducatedMajor = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    HumanCollege = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    HumanIdcard = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    HumanBirthplace = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DemandSalaryStandard = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    HumanHistoryRecords = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Recomandation = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    HumanPicture = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    AttachmentName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CheckStatus = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Register = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    RegistTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    Checker = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CheckTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    InterviewStatus = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    TotalPoints = table.Column<int>(type: "int", nullable: true),
                    TestAmount = table.Column<int>(type: "int", nullable: true),
                    TestChecker = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    TestCheckTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    PassRegister = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    PassRegistTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    PassChecker = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    PassCheckTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    PassCheckStatus = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    PassCheckComment = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    PassPassComment = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_ER", x => x.ResId);
                });

            migrationBuilder.CreateTable(
                name: "ES",
                columns: table => new
                {
                    SubId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    FirstKindId = table.Column<int>(type: "int", nullable: false),
                    FirstKindName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    SecondKindId = table.Column<int>(type: "int", nullable: false),
                    SecondKindName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Register = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    RegistTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    Derivation = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Content = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    KeyA = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    KeyB = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    KeyC = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    KeyD = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    KeyE = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    CorrectKey = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Changer = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ChangeTime = table.Column<DateTime>(type: "datetime2", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_ES", x => x.SubId);
                });

            migrationBuilder.CreateTable(
                name: "GroupMenu",
                columns: table => new
                {
                    GroupID = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    GroupName = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_GroupMenu", x => x.GroupID);
                });

            migrationBuilder.CreateTable(
                name: "HF",
                columns: table => new
                {
                    HufId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    HumanId = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    FirstKindId = table.Column<int>(type: "int", nullable: true),
                    FirstKindName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SecondKindId = table.Column<int>(type: "int", nullable: true),
                    SecondKindName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ThirdKindId = table.Column<int>(type: "int", nullable: true),
                    ThirdKindName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    HumanName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
                    HumanAddress = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
                    HumanPostcode = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    HumanProDesignation = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    HumanMajorKindId = table.Column<int>(type: "int", nullable: true),
                    HumanMajorKindName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
                    HumanMajorId = table.Column<int>(type: "int", nullable: true),
                    HumanMajorName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
                    HumanTelephone = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    HumanMobilephone = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    HumanBank = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
                    HumanAccount = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    HumanQQ = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    HumanEmail = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
                    HumanHobby = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
                    HumanSpeciality = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
                    HumanSex = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    HumanReligion = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    HumanParty = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    HumanNationality = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    HumanRace = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    HumanBirthday = table.Column<DateTime>(type: "datetime2", nullable: true),
                    HumanBirthplace = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
                    HumanAge = table.Column<int>(type: "int", nullable: true),
                    HumanEducatedDegree = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    HumanEducatedYears = table.Column<int>(type: "int", nullable: true),
                    HumanEducatedMajor = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
                    HumanSocietySecurityId = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    HumanIdCard = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    Remark = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
                    SalaryStandardId = table.Column<int>(type: "int", nullable: true),
                    SalaryStandardName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
                    SalarySum = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    DemandSalaraySum = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    PaidSalarySum = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    MajorChangeAmount = table.Column<int>(type: "int", nullable: true),
                    BonusAmount = table.Column<int>(type: "int", nullable: true),
                    TrainingAmount = table.Column<int>(type: "int", nullable: true),
                    FileChangAmount = table.Column<int>(type: "int", nullable: true),
                    HumanHistroyRecords = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
                    HumanFamilyMembership = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
                    HumanPicture = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    AttachmentName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
                    CheckStatus = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    Register = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    Checker = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    Changer = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    RegistTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    CheckTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    ChangeTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    LastlyChangeTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    DeleteTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    RecoveryTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    HumanFileStatus = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_HF", x => x.HufId);
                });

            migrationBuilder.CreateTable(
                name: "HFD",
                columns: table => new
                {
                    HfdId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    HumanId = table.Column<int>(type: "int", nullable: false),
                    FirstKindId = table.Column<int>(type: "int", nullable: false),
                    FirstKindName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    SecondKindId = table.Column<int>(type: "int", nullable: false),
                    SecondKindName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ThirdKindId = table.Column<int>(type: "int", nullable: false),
                    ThirdKindName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    HumanName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
                    HumanAddress = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
                    HumanPostcode = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false),
                    HumanProDesignation = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    HumanMajorKindId = table.Column<int>(type: "int", nullable: false),
                    HumanMajorKindName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
                    HumanMajorId = table.Column<int>(type: "int", nullable: false),
                    HumanMajorName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
                    HumanTelephone = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false),
                    HumanMobilephone = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false),
                    HumanBank = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
                    HumanAccount = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    HumanQQ = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false),
                    HumanEmail = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
                    HumanHobby = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
                    HumanSpeciality = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
                    HumanSex = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    HumanReligion = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    HumanParty = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    HumanNationality = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    HumanRace = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    HumanBirthday = table.Column<DateTime>(type: "datetime2", nullable: false),
                    HumanBirthplace = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
                    HumanAge = table.Column<int>(type: "int", nullable: false),
                    HumanEducatedDegree = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    HumanEducatedYears = table.Column<int>(type: "int", nullable: false),
                    HumanEducatedMajor = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
                    HumanSocietySecurityId = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    HumanIdCard = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: false),
                    SalaryStandardId = table.Column<int>(type: "int", nullable: false),
                    SalaryStandardName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
                    SalarySum = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    DemandSalaraySum = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    PaidSalarySum = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    MajorChangeAmount = table.Column<int>(type: "int", nullable: false),
                    BonusAmount = table.Column<int>(type: "int", nullable: false),
                    TrainingAmount = table.Column<int>(type: "int", nullable: false),
                    FileChangAmount = table.Column<int>(type: "int", nullable: false),
                    HumanHistroyRecords = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: false),
                    HumanFamilyMembership = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: false),
                    HumanPicture = table.Column<byte[]>(type: "varbinary(max)", nullable: false),
                    AttachmentName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
                    CheckStatus = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false),
                    Register = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    Checker = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    Changer = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    RegistTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    CheckTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    ChangeTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    LastlyChangeTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DeleteTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    RecoveryTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    HumanFileStatus = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_HFD", x => x.HfdId);
                });

            migrationBuilder.CreateTable(
                name: "Jurisdiction",
                columns: table => new
                {
                    JuriID = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    JurName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    GroupID = table.Column<int>(type: "int", nullable: false),
                    JurAddress = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    JurisdictionJuriID = table.Column<int>(type: "int", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Jurisdiction", x => x.JuriID);
                    table.ForeignKey(
                        name: "FK_Jurisdiction_Jurisdiction_JurisdictionJuriID",
                        column: x => x.JurisdictionJuriID,
                        principalTable: "Jurisdiction",
                        principalColumn: "JuriID");
                });

            migrationBuilder.CreateTable(
                name: "MC",
                columns: table => new
                {
                    MchId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    FirstKindId = table.Column<int>(type: "int", nullable: false),
                    FirstKindName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    SecondKindId = table.Column<int>(type: "int", nullable: false),
                    SecondKindName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    ThirdKindId = table.Column<int>(type: "int", nullable: false),
                    ThirdKindName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    MajorKindId = table.Column<int>(type: "int", nullable: false),
                    MajorKindName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    MajorId = table.Column<int>(type: "int", nullable: false),
                    MajorName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    NewFirstKindId = table.Column<int>(type: "int", nullable: false),
                    NewFirstKindName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    NewSecondKindId = table.Column<int>(type: "int", nullable: false),
                    NewSecondKindName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    NewThirdKindId = table.Column<int>(type: "int", nullable: false),
                    NewThirdkindName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    NewMajorKindId = table.Column<int>(type: "int", nullable: false),
                    NewMajorKindName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    NewMajorId = table.Column<int>(type: "int", nullable: false),
                    NewMajorName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    HumanId = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    HumanName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    SalaryStandardId = table.Column<int>(type: "int", nullable: false),
                    SalaryStandardName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
                    SalarySum = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    NewSalaryStandardId = table.Column<int>(type: "int", nullable: false),
                    NewSalaryStandardName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
                    NewSalarySum = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    ChangeReason = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: false),
                    CheckReason = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: false),
                    CheckStatus = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false),
                    Register = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    Checker = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    RegistTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    CheckTime = table.Column<DateTime>(type: "datetime2", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_MC", x => x.MchId);
                });

            migrationBuilder.CreateTable(
                name: "recruitments",
                columns: table => new
                {
                    RecruitmentID = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    RecruitmentName = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_recruitments", x => x.RecruitmentID);
                });

            migrationBuilder.CreateTable(
                name: "Roles",
                columns: table => new
                {
                    RolesID = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    RolesName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
                    RolesInstruction = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: false),
                    RolesIf = table.Column<int>(type: "int", nullable: false, defaultValue: 1)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Roles", x => x.RolesID);
                });

            migrationBuilder.CreateTable(
                name: "SG",
                columns: table => new
                {
                    SgrId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    SalaryGrantId = table.Column<int>(type: "int", nullable: false),
                    SalaryStandardId = table.Column<int>(type: "int", nullable: false),
                    FirstKindId = table.Column<int>(type: "int", nullable: false),
                    FirstKindName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    SecondKindId = table.Column<int>(type: "int", nullable: false),
                    SecondKindName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    ThirdKindId = table.Column<int>(type: "int", nullable: false),
                    ThirdKindName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    HumanAmount = table.Column<int>(type: "int", nullable: false),
                    SalaryStandardSum = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    SalaryPaidSum = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    Register = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    RegistTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    Checker = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    CheckTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    CheckStatus = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false),
                    jine = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SG", x => x.SgrId);
                });

            migrationBuilder.CreateTable(
                name: "SGD",
                columns: table => new
                {
                    GrdId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    SalaryGrantId = table.Column<int>(type: "int", nullable: false),
                    HumanId = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    HumanName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    BounsSum = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    SaleSum = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    DeductSum = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    SalaryStandardSum = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    SalaryPaidSum = table.Column<decimal>(type: "decimal(18,2)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SGD", x => x.GrdId);
                });

            migrationBuilder.CreateTable(
                name: "SS",
                columns: table => new
                {
                    SsdId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    StandardId = table.Column<int>(type: "int", nullable: false),
                    StandardName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
                    Designer = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    Register = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    Checker = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    Changer = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    RegistTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    CheckTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    ChangeTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    SalarySum = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    CheckStatus = table.Column<bool>(type: "bit", nullable: false),
                    ChangeStatus = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    CheckComment = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SS", x => x.SsdId);
                });

            migrationBuilder.CreateTable(
                name: "SSD",
                columns: table => new
                {
                    SdtId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    StandardId = table.Column<int>(type: "int", nullable: false),
                    StandardName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
                    ItemId = table.Column<int>(type: "int", nullable: false),
                    ItemName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
                    Salary = table.Column<decimal>(type: "decimal(18,2)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SSD", x => x.SdtId);
                });

            migrationBuilder.CreateTable(
                name: "Student",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Name = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false),
                    Sex = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Student", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Training",
                columns: table => new
                {
                    TrId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    MajorKindId = table.Column<int>(type: "int", nullable: false),
                    MajorKindName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    MajorId = table.Column<int>(type: "int", nullable: false),
                    MajorName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    HumanId = table.Column<int>(type: "int", nullable: false),
                    HumanName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    TrainingItem = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
                    TrainingTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    TrainingHour = table.Column<int>(type: "int", nullable: false),
                    TrainingDegree = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    Register = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    Checker = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    RegistTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    CheckTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    Checkstatus = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Training", x => x.TrId);
                });

            migrationBuilder.CreateTable(
                name: "User",
                columns: table => new
                {
                    UId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    UName = table.Column<string>(type: "varchar(20)", nullable: false),
                    UTrueName = table.Column<string>(type: "varchar(20)", nullable: false),
                    UPassWord = table.Column<string>(type: "varchar(20)", nullable: false),
                    Uidentity = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_User", x => x.UId);
                });

            migrationBuilder.CreateTable(
                name: "CM",
                columns: table => new
                {
                    MakId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    MajorKindId = table.Column<int>(type: "int", nullable: false),
                    MajorKindName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    MajorId = table.Column<int>(type: "int", nullable: false),
                    MajorName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    TestAmount = table.Column<int>(type: "int", nullable: false),
                    CMKMfkId = table.Column<int>(type: "int", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_CM", x => x.MakId);
                    table.ForeignKey(
                        name: "FK_CM_CMK_CMKMfkId",
                        column: x => x.CMKMfkId,
                        principalTable: "CMK",
                        principalColumn: "MfkId");
                });

            migrationBuilder.CreateTable(
                name: "RoleJurisdiction",
                columns: table => new
                {
                    RolesJID = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    RolesID = table.Column<int>(type: "int", nullable: false),
                    JuriID = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_RoleJurisdiction", x => x.RolesJID);
                    table.ForeignKey(
                        name: "FK_RoleJurisdiction_Jurisdiction_JuriID",
                        column: x => x.JuriID,
                        principalTable: "Jurisdiction",
                        principalColumn: "JuriID",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_RoleJurisdiction_Roles_RolesID",
                        column: x => x.RolesID,
                        principalTable: "Roles",
                        principalColumn: "RolesID",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "UserRole",
                columns: table => new
                {
                    UserRolesID = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    UserID = table.Column<int>(type: "int", nullable: false),
                    RolesID = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_UserRole", x => x.UserRolesID);
                    table.ForeignKey(
                        name: "FK_UserRole_Roles_RolesID",
                        column: x => x.RolesID,
                        principalTable: "Roles",
                        principalColumn: "RolesID",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_UserRole_User_UserID",
                        column: x => x.UserID,
                        principalTable: "User",
                        principalColumn: "UId",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateIndex(
                name: "IX_CFSK_CFSKFskId",
                table: "CFSK",
                column: "CFSKFskId");

            migrationBuilder.CreateIndex(
                name: "IX_CM_CMKMfkId",
                table: "CM",
                column: "CMKMfkId");

            migrationBuilder.CreateIndex(
                name: "IX_Jurisdiction_JurisdictionJuriID",
                table: "Jurisdiction",
                column: "JurisdictionJuriID");

            migrationBuilder.CreateIndex(
                name: "IX_RoleJurisdiction_JuriID",
                table: "RoleJurisdiction",
                column: "JuriID");

            migrationBuilder.CreateIndex(
                name: "IX_RoleJurisdiction_RolesID",
                table: "RoleJurisdiction",
                column: "RolesID");

            migrationBuilder.CreateIndex(
                name: "IX_UserRole_RolesID",
                table: "UserRole",
                column: "RolesID");

            migrationBuilder.CreateIndex(
                name: "IX_UserRole_UserID",
                table: "UserRole",
                column: "UserID");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "Bonus");

            migrationBuilder.DropTable(
                name: "CFFK");

            migrationBuilder.DropTable(
                name: "CFSK");

            migrationBuilder.DropTable(
                name: "CFTK");

            migrationBuilder.DropTable(
                name: "CM");

            migrationBuilder.DropTable(
                name: "CPC");

            migrationBuilder.DropTable(
                name: "CQFK");

            migrationBuilder.DropTable(
                name: "CQSK");

            migrationBuilder.DropTable(
                name: "EA");

            migrationBuilder.DropTable(
                name: "EAD");

            migrationBuilder.DropTable(
                name: "EE");

            migrationBuilder.DropTable(
                name: "EED");

            migrationBuilder.DropTable(
                name: "EI");

            migrationBuilder.DropTable(
                name: "EMR");

            migrationBuilder.DropTable(
                name: "ER");

            migrationBuilder.DropTable(
                name: "ES");

            migrationBuilder.DropTable(
                name: "GroupMenu");

            migrationBuilder.DropTable(
                name: "HF");

            migrationBuilder.DropTable(
                name: "HFD");

            migrationBuilder.DropTable(
                name: "MC");

            migrationBuilder.DropTable(
                name: "recruitments");

            migrationBuilder.DropTable(
                name: "RoleJurisdiction");

            migrationBuilder.DropTable(
                name: "SG");

            migrationBuilder.DropTable(
                name: "SGD");

            migrationBuilder.DropTable(
                name: "SS");

            migrationBuilder.DropTable(
                name: "SSD");

            migrationBuilder.DropTable(
                name: "Student");

            migrationBuilder.DropTable(
                name: "Training");

            migrationBuilder.DropTable(
                name: "UserRole");

            migrationBuilder.DropTable(
                name: "CMK");

            migrationBuilder.DropTable(
                name: "Jurisdiction");

            migrationBuilder.DropTable(
                name: "Roles");

            migrationBuilder.DropTable(
                name: "User");
        }
    }
}
